Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add db integration tests #132

Merged
merged 6 commits into from
Jan 22, 2025
Merged

Add db integration tests #132

merged 6 commits into from
Jan 22, 2025

Conversation

kirugan
Copy link
Contributor

@kirugan kirugan commented Jan 17, 2025

Added integration tests for database (already found bug with max uint64 value - it's not possible to store it in bson).

@@ -45,12 +45,12 @@ var collections = map[string][]index{
LastProcessedHeightCollection: {{Indexes: map[string]int{}}},
}

func Setup(ctx context.Context, cfg *config.Config) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to pass entire config, only db values are used here

@kirugan kirugan marked this pull request as ready for review January 20, 2025 10:14
@jrwbabylonlab jrwbabylonlab requested a review from gusin13 January 21, 2025 07:17
Copy link
Collaborator

@gusin13 gusin13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work, lgtm!

@gusin13
Copy link
Collaborator

gusin13 commented Jan 21, 2025

already found bug with max uint64 value - it's not possible to store it in bson

@kirugan can you share more details about the bug?

@kirugan
Copy link
Contributor Author

kirugan commented Jan 21, 2025

@kirugan can you share more details about the bug?

@gusin13 sure, so if you try to store math.MaxUint64 you will get an error because integer literals in BSON corresponds to int64.

@kirugan kirugan merged commit ef3bb2a into main Jan 22, 2025
14 checks passed
@kirugan kirugan deleted the kirugan/add-db-integration-tests branch January 22, 2025 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants